<?php
// Calendar includes
echo $javascript->link('jscalendar-1.0/calendar.js');
echo $javascript->link('jscalendar-1.0/lang/calendar-es.js');
echo $javascript->link('common.js');
// CSS Calendar Theme
echo $html->css('../js/jscalendar-1.0/skins/aqua/theme');
?>
<?php echo $html->css('default', NULL, array(),false) ?>
<?php echo $html->css('form_style', NULL, array(),false) ?>
<?php echo $javascript->link('prototype-1.6.0.3.js'); ?>
<div id="columnA">
    <h3>Agregar Control Fito Sanitario</h3>
    <?php
    echo 'Los campos marcados con (*) son obligatorios.';
    echo $form->create('Controlessanitario',array('controller'=>'controlessanitarios','action'=>'agregar/'.$revision['Revision']['id']));
    ?>
    <table>
        <thead>
            <tr>
                <th>*Cultivo</th>
                <th>*T. Plaga</th>
                <th>*Nom. Plaga</th>
                <th>Env. Muestra</th>
                <th>Fecha</th>
            </tr>
        </thead>
        <tbody id="controlfitosanitarioContainer">
            <?php
            echo '<tr>';
            echo '<td rowspan="2">'.$form->input("Controlessanitario.produccion_id",array('label'=>'','div'=>false,'class'=>'inputstyle input190','type'=>'select','options'=>$producciones)).'</td>';
            echo '<td>'.$form->input("Controlessanitario.tipo_plaga",array('label'=>'','div'=>false,'class'=>'inputstyle input100','type'=>'select','options'=>$plagastipo)).'</td>';
            echo '<td>'.$form->input("Controlessanitario.nombre_plaga",array('label'=>'','div'=>false,'class'=>'inputstyle input110')).'</td>';
            echo '<td>'.$form->input("Controlessanitario.envia_muestra",array('label'=>'','div'=>false,'class'=>'inputstyle input50','type'=>'select','options'=>$eleccion)).'</td>';
            echo '<td>'.$datePicker->picker("Controlessanitario.fch_envio_muestra", array('label'=>'','div'=>false,'class'=>'inputstyle input80', 'id'=>'Controlsanitario.FchEnvioMuestra')).'</td>';
            echo '</tr>';
            echo '<tr>';
            echo '<td colspan="4">'.$form->input("Controlessanitario.observaciones",array('label'=>'','div'=>false,'class'=>'inputstyle','cols'=>'55','rows'=>'1','value'=>'Observaciones: ')).'</td>';
            echo '</tr>';
            ?>
        </tbody>
    </table>
    <?php
    echo $form->button('Cancelar', array('onclick'=>'javascript:window.location="/sistemahorticola/revisiones/ver/'.$revision['Revision']['id'].'"'));
    echo $form->submit('Guardar', array('div'=>false));
    echo $form->end();
    ?>
</div>